Public API: the poisson_solver module

Quick access

Types:coulomb_operator
Variables:dp, gp, tcat_psolv_commun, tcat_psolv_comput, tcat_psolv_kernel
Routines:electrostatic_solver(), f_fft_dimensions(), h_potential(), p_fft_dimensions(), ps_dim4allocation(), ps_dump_coulomb_operator(), ps_set_options(), ps_soft_pcm_forces(), psolver_logo(), s_fft_dimensions(), w_fft_dimensions(), xc_dimensions()

Needed modules

Types

  • type poisson_solver/coulomb_operator
    Type fields:
    • % arr [grid_observables]
    • % cavity [cavity_data]
    • % diel [dielectric_arrays]
    • % gpu [gpu_workarrays]
    • % grid [fft_metadata]
    • % igpu [integer]
    • % inplane_mpi [mpi_environment]
    • % itype_scf [integer]
    • % keepzf [integer]
    • % kernel (*) [real, pointer]
    • % max_iter [integer]
    • % max_iter_pb [integer]
    • % mesh [cell]
    • % method [f_enumerator]
    • % minres [real]
    • % minres_pb [real]
    • % mpi_env [mpi_environment]
    • % mu [real]
    • % opt [psolver_options]
    • % part_mpi [mpi_environment]
    • % pb_eta [real]
    • % pcg_gpu [pcg_gpu_workarrays]
    • % pi_eta [real]
    • % radii_dict [dictionary, pointer]
    • % radii_set [integer]
    • % use_gpu_direct [logical]
    • % w [ps_workarrays]

Variables

  • poisson_solver/dp [public]
  • poisson_solver/gp [public]
  • poisson_solver/tcat_psolv_commun [public]
  • poisson_solver/tcat_psolv_comput [public]
  • poisson_solver/tcat_psolv_kernel [public]

Subroutines and functions

Use :wrapper_mpi, yaml_output
subroutine poisson_solver/electrostatic_solver(kernel, rhov[, energies, pot_ion, rho_ion, ehartree])
Parameters:
  • kernel [coulomb_operator, inout]
  • rhov (kernel%mesh%ndims(1,kernel%mesh%ndims(2,*) [real, inout]
Options:
  • energies [psolver_energies, out,]
  • pot_ion (kernel%mesh%ndims(1,kernel%mesh%ndims(2,kernel%grid%n3p) [real, inout,target]
  • rho_ion (kernel%mesh%ndims(1,kernel%mesh%ndims(2,kernel%grid%n3p) [real, inout,target]
  • ehartree [real, out,]
Use :

fdder, workarrays, at_domain (domain_geocode()), f_enums, dynamic_memory, yaml_output, psolver_environment, pstypes, psbox, dictionaries (f_err_throw()), f_utils, wrapper_linalg

subroutine poisson_solver/h_potential(datacode, kernel, rhopot, pot_ion, eh, offset, sumpion[, quiet, rho_ion, stress_tensor])
Parameters:
  • datacode [character(len=1), in]
  • kernel [coulomb_operator, inout]
  • rhopot (*) [real, inout]
  • pot_ion (*) [real, inout]
  • eh [real, out]
  • offset [real, in]
  • sumpion [logical, in]
Options:
  • quiet [character(len=3), in,]
  • rho_ion (kernel%grid%m1,kernel%grid%m3*kernel%grid%n3p) [real, inout,]
  • stress_tensor (6) [real, out,]
Use :

fdder, f_enums, yaml_strings, psolver_environment

Called from:

internal_calculation_exctx(), conv_check_fft

subroutine poisson_solver/ps_dump_coulomb_operator(kernel, prefix)
Parameters:
Use :

iobox, yaml_output, f_enums, dynamic_memory, psolver_environment, psbox

subroutine poisson_solver/ps_dim4allocation(geocode, datacode, iproc, nproc, n01, n02, n03, use_gradient, use_wb_corr, igpu, n3d, n3p, n3pi, i3xcsh, i3s)
Parameters:
  • geocode [character(len=1), in]
  • datacode [character(len=1), in]
  • iproc [integer, in]
  • nproc [integer, in]
  • n01 [integer, in]
  • n02 [integer, in]
  • n03 [integer, in]
  • use_gradient [logical, in]
  • use_wb_corr [logical, in]
  • igpu [integer, in]
  • n3d [integer, out]
  • n3p [integer, out]
  • n3pi [integer, out]
  • i3xcsh [integer, out]
  • i3s [integer, out]
Use :

pstypes, dictionaries (f_err_throw())

subroutine poisson_solver/xc_dimensions(geocode, use_gradient, use_wb_corr, istart, iend, m2, nxc, nxcl, nxcr, nwbl, nwbr, i3s, i3xcsh)
Parameters:
  • geocode [character(len=1), in]
  • use_gradient [logical, in]
  • use_wb_corr [logical, in]
  • istart [integer, in]
  • iend [integer, in]
  • m2 [integer, in]
  • nxc [integer, out]
  • nxcl [integer, out]
  • nxcr [integer, out]
  • nwbl [integer, out]
  • nwbr [integer, out]
  • i3s [integer, out]
  • i3xcsh [integer, out]
subroutine poisson_solver/p_fft_dimensions(n01, n02, n03, m1, m2, m3, n1, n2, n3, md1, md2, md3, nd1, nd2, nd3, nproc, enlarge_md2)
Parameters:
  • n01 [integer, in]
  • n02 [integer, in]
  • n03 [integer, in]
  • m1 [integer, out]
  • m2 [integer, out]
  • m3 [integer, out]
  • n1 [integer, out]
  • n2 [integer, out]
  • n3 [integer, out]
  • md1 [integer, out]
  • md2 [integer, out]
  • md3 [integer, out]
  • nd1 [integer, out]
  • nd2 [integer, out]
  • nd3 [integer, out]
  • nproc [integer, in]
  • enlarge_md2 [logical, in]
Use :

pstypes

Called from:

conv_check_fft

subroutine poisson_solver/s_fft_dimensions(n01, n02, n03, m1, m2, m3, n1, n2, n3, md1, md2, md3, nd1, nd2, nd3, nproc, gpu, enlarge_md2[, non_ortho])
Parameters:
  • n01 [integer, in]
  • n02 [integer, in]
  • n03 [integer, in]
  • m1 [integer, out]
  • m2 [integer, out]
  • m3 [integer, out]
  • n1 [integer, out]
  • n2 [integer, out]
  • n3 [integer, out]
  • md1 [integer, out]
  • md2 [integer, out]
  • md3 [integer, out]
  • nd1 [integer, out]
  • nd2 [integer, out]
  • nd3 [integer, out]
  • nproc [integer, in]
  • gpu [integer, in]
  • enlarge_md2 [logical, in]
Options:

non_ortho [logical, in,]

Use :

pstypes

Called from:

conv_check_fft

subroutine poisson_solver/w_fft_dimensions(n01, n02, n03, m1, m2, m3, n1, n2, n3, md1, md2, md3, nd1, nd2, nd3, nproc, gpu, enlarge_md2)
Parameters:
  • n01 [integer, in]
  • n02 [integer, in]
  • n03 [integer, in]
  • m1 [integer, out]
  • m2 [integer, out]
  • m3 [integer, out]
  • n1 [integer, out]
  • n2 [integer, out]
  • n3 [integer, out]
  • md1 [integer, out]
  • md2 [integer, out]
  • md3 [integer, out]
  • nd1 [integer, out]
  • nd2 [integer, out]
  • nd3 [integer, out]
  • nproc [integer, in]
  • gpu [integer, in]
  • enlarge_md2 [logical, in]
Use :

pstypes

Called from:

conv_check_fft

subroutine poisson_solver/f_fft_dimensions(n01, n02, n03, m1, m2, m3, n1, n2, n3, md1, md2, md3, nd1, nd2, nd3, nproc, gpu, enlarge_md2)
Parameters:
  • n01 [integer, in]
  • n02 [integer, in]
  • n03 [integer, in]
  • m1 [integer, out]
  • m2 [integer, out]
  • m3 [integer, out]
  • n1 [integer, out]
  • n2 [integer, out]
  • n3 [integer, out]
  • md1 [integer, out]
  • md2 [integer, out]
  • md3 [integer, out]
  • nd1 [integer, out]
  • nd2 [integer, out]
  • nd3 [integer, out]
  • nproc [integer, in]
  • gpu [integer, in]
  • enlarge_md2 [logical, in]
Use :

pstypes

Called from:

conv_check_fft

subroutine poisson_solver/ps_set_options(kernel[, global_data, calculate_strten, verbose, update_cavity, use_input_guess, cavity_info, cavitation_terms, potential_integral, final_call])
Parameters:

kernel [coulomb_operator, inout]

Options:
  • global_data [logical, in,]
  • calculate_strten [logical, in,]
  • verbose [logical, in,]
  • update_cavity [logical, in,]
  • use_input_guess [logical, in,]
  • cavity_info [logical, in,]
  • cavitation_terms [logical, in,]
  • potential_integral [real, in,]
  • final_call [logical, in,]
subroutine poisson_solver/ps_soft_pcm_forces(kernel, fpcm)
Parameters:
Use :

psolver_environment, box, f_utils (f_zero())

subroutine poisson_solver/pkernel_free(kernel)
Parameters:kernel [coulomb_operator, inout]
Use :dictionaries (dict_free()), pstypes, workarrays, dynamic_memory, wrapper_mpi
function poisson_solver/pkernel_init(iproc, nproc, dict, dom, ndims, hgrids[, alpha_bc, beta_ac, gamma_ab, mpi_env])
Parameters:
  • iproc [integer, in]
  • nproc [integer, in]
  • dict [dictionary, pointer]
  • dom [domain, in]
  • ndims (3) [integer, in]
  • hgrids (3) [real, in]
Options:
  • alpha_bc [real, in,]
  • beta_ac [real, in,]
  • gamma_ab [real, in,]
  • mpi_env [mpi_environment, in,]
Return:

kernel [coulomb_operator]

Use :

yaml_output, dictionaries, numerics, wrapper_mpi, f_enums, psolver_environment, box (cell_new()), f_input_file (input_file_dump()), at_domain, pstypes

subroutine poisson_solver/pkernel_set(kernel[, eps, dlogeps, oneoeps, oneosqrteps, corr, verbose])
Parameters:

kernel [coulomb_operator, inout]

Options:
  • eps (,,*) [real, in,]
  • dlogeps (,,*,*) [real, in,]
  • oneoeps (,,*) [real, in,]
  • oneosqrteps (,,*) [real, in,]
  • corr (,,*) [real, in,]
  • verbose [logical, in,]
Use :

yaml_output, dynamic_memory, time_profiling (f_timing()), dictionaries (f_err_throw()), yaml_strings (operator(+)(), yaml_toa()), numerics, workarrays, pstypes, f_enums, wrapper_mpi, at_domain (domain_geocode(), domain_periodic_dims())

subroutine poisson_solver/pkernel_set_epsilon(kernel[, eps, dlogeps, oneoeps, oneosqrteps, corr, nat, rxyz, radii])
Parameters:

kernel [coulomb_operator, inout]

Options:
  • eps (,,*) [real, in,]
  • dlogeps (,,*,*) [real, in,]
  • oneoeps (,,*) [real, in,]
  • oneosqrteps (,,*) [real, in,]
  • corr (,,*) [real, in,]
  • nat [integer, in,]
  • rxyz (*) [real, in,]
  • radii (*) [real, in,]
Use :

yaml_strings, dynamic_memory, fdder, dictionaries (f_err_throw()), numerics (pi()), psolver_environment (rigid_cavity_arrays(), vacuum_eps()), f_utils (f_zero()), workarrays, f_enums

subroutine poisson_solver/pkernel_allocate_cavity(kernel[, vacuum])
Parameters:kernel [coulomb_operator, inout]
Options:vacuum [logical, in,]
Use :psolver_environment (ps_sccs_enum(), vacuum_eps()), f_utils (f_zero()), f_enums
function poisson_solver/pkernel_get_radius(kernel, atname)
Parameters:
Return:

radius [real]

Use :

numerics (bohr_ang()), psolver_environment, dictionaries, pstypes

subroutine poisson_solver/rebuild_cavity_from_rho(rho_full, nabla_rho, nabla2_rho, delta_rho, cc_rho, depsdrho, dsurfdrho, kernel)
Parameters:
  • rho_full (kernel%mesh%ndims(1,kernel%mesh%ndims(2,kernel%mesh%ndims(3) [real, in]
  • nabla_rho (kernel%mesh%ndims(1,kernel%mesh%ndims(2,kernel%mesh%ndims(3,3) [real, out]
  • nabla2_rho (kernel%mesh%ndims(1,kernel%mesh%ndims(2,kernel%mesh%ndims(3) [real, out]
  • delta_rho (kernel%mesh%ndims(1,kernel%mesh%ndims(2,kernel%mesh%ndims(3) [real, out]
  • cc_rho (kernel%mesh%ndims(1,kernel%mesh%ndims(2,kernel%mesh%ndims(3) [real, out]
  • depsdrho (kernel%mesh%ndims(1,kernel%mesh%ndims(2)*kernel%grid%n3p) [real, out]
  • dsurfdrho (kernel%mesh%ndims(1,kernel%mesh%ndims(2)*kernel%grid%n3p) [real, out]
  • kernel [coulomb_operator, inout]
Use :

fdder, f_enums, psbox, pstypes, psolver_environment